package com.wudl.queue.config;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author ：wudl
 * @date ：Created in 2021-12-12 22:49
 * @description：
 * @modified By：
 * @version: 1.0
 */

public class MyAppThreadFactory {
    /**
     * 线程池执行器 Executors 首选的线程池
     * ExecutorService executorService=Executors.newCachedThreadPool();
     */
    public static ExecutorService myCachedThreadPool= new ThreadPoolExecutor(0, Integer.MAX_VALUE,
            60L, TimeUnit.MILLISECONDS,
            new SynchronousQueue<Runnable>());
}
